const _defaultConfig = {
  isUni: false,
  default: {
    baseURL: "http://127.0.0.1:8080",
    timeout: 120000,
  },
};

let userConfig = () => {};

function setUserConfig(conf) {
  if (conf) userConfig = conf;
}

function getConfig() {
  let u = userConfig()
  return Object.assign({}, _defaultConfig, u);
}

export default {
  setUserConfig,
  getConfig,
};
